import Vue from "vue";
import VueRouter from "vue-router";
import Login from "../views/Login.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Login",
    component: Login,
  },
  {
    path: "/index",
    name: "Index",
    redirect: "/strategies",
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/Index.vue"),
    children: [
      {
        path: "/strategies",
        name: "Strategies",
        component: () =>
          import(
            /* webpackChunkName: "about" */ "../views/Strategies/strategies.vue"
          ),
      },
      {
        path: "/dataDictionary",
        name: "DataDictionary",
        component: () =>
          import(
            /* webpackChunkName: "about" */ "../views/DataDictionary/dataDictionary.vue"
          ),
      },
      {
        path: "/kpiManagement",
        name: "KpiManagement",
        component: () =>
          import(
            /* webpackChunkName: "about" */ "../views/KPI/kpiManagement.vue"
          ),
      },
      {
        path: "/systemLog",
        name: "SystemLog",
        component: () =>
          import(
            /* webpackChunkName: "about" */ "../views/SystemLog/systemLog.vue"
          ),
      },
      {
        path: "/userManagement",
        name: "UserManagement",
        component: () =>
          import(
            /* webpackChunkName: "about" */ "../views/userManagement/userManagement.vue"
          ),
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
